package com.ziq.zcamp.util

import com.ziq.zcamp.manager.GlobalContextManager

class WeatherUtil {
    companion object {
        fun getWeatherResByCode(code: String) :Int{
            try {
                val appInfo = GlobalContextManager.appContext!!.getApplicationInfo()
                val resID = GlobalContextManager.getResources().getIdentifier("weather_$code", "drawable", appInfo.packageName)
                if(resID == code.toInt()){
                    return 0
                }
                return resID
            }catch (e:Exception){
            }
            return 0
        }
    }
}